home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / rettig.arc / TRSOURCE.EXE / TR_BOW.PRG < prev    next >
Text File  |  1990-10-22  |  375b  |  21 lines

  1. *********
  2. * Function : BOW
  3. * By : Tom Rettig
  4. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  5. *
  6. * Syntax: BOW( <expD> )
  7. * Return: Date of the first Monday same as or preceding <expD>
  8. *********
  9.  
  10.  
  11. FUNCTION BOW
  12. PARAMETERS tr_date
  13. IF DOW(tr_date) = 1
  14.    RETURN tr_date - 6
  15. ELSE
  16.    RETURN tr_date - ( DOW(tr_date) - 2 )
  17. ENDIF
  18. * eofunc BOW
  19.  
  20.  
  21.